import 'dart:convert';

/// uid : "V50ART--1731321941916742821815271"
/// token : "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXlsb2FkIjp7InJlZGlzS2V5IjoiMTczMTMyMTk0MTk6NjU2OGY5MTQtNTJlNy00MGM2LTkwNmQtN2UyYTljMTU4ZjNiIiwidXNlclBob25lIjoiMTczMTMyMTk0MTkiLCJleHBpcmVUaW1lIjoxNjc4MjY4MzQwNjUzfX0.0G-1NDngXfwdDufEGGzaQ4HV6n7F1osunnPe3uqV5BE"

UserBean userBeanFromJson(String str) => UserBean.fromJson(json.decode(str));
String userBeanToJson(UserBean data) => json.encode(data.toJson());

class UserBean {
  UserBean({
    String? uid,
    String? token,
  }) {
    _uid = uid;
    _token = token;
  }

  UserBean.fromJson(dynamic json) {
    _uid = json['uid'];
    _token = json['token'];
  }
  String? _uid;
  String? _token;
  UserBean copyWith({
    String? uid,
    String? token,
  }) =>
      UserBean(
        uid: uid ?? _uid,
        token: token ?? _token,
      );
  String? get uid => _uid;
  String? get token => _token;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['uid'] = _uid;
    map['token'] = _token;
    return map;
  }
}
